package com.fezs.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum ActiveEnum implements BaseEnum<Integer> {

    ENABLE(1 ,"有效"),
    DISABLE(0 , "无效");

    private final Integer code;
    private final String descp;

    public static ActiveEnum getEnumByCode(Integer code){
        switch (code) {
            case 0:
                return DISABLE;
            case 1:
                return ENABLE;
        }
        return DISABLE;
    }

}
